package com.daisuxia.back.controller;

import javax.servlet.http.HttpServletRequest;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.daisuxia.back.service.ITaskJob;
import com.daisuxia.web.controller.BaseController;

/***
 * 富友订单查询Controller
 * @author yuanyiwen
 */
@Controller
@RequestMapping("/fuiouOrder")
public class QueryFuiouOrderController extends BaseController {

	private static Logger logger = LoggerFactory.getLogger(QueryFuiouOrderController.class);

	@Autowired
	private ITaskJob taskJob;

	/**
	 * 富友订单查询
	 */
	@RequestMapping("queryFuiouOrder")
	public void queryFuiouOrder(HttpServletRequest request, String orderId) {
		logger.info("富友订单查询,订单号:" + orderId);
		if(null == orderId || "".equals(orderId)){
			logger.warn("富友订单查询,订单号为空");
			return;
		}
		try {
			taskJob.queryOrderResult(orderId);
			
		} catch (Exception e) {
			logger.error("queryFuiouOrder error", e);
		}
	}
}
